In video compression technologies such as Moving Picture Experts Group (MPEG) 4 and H.264 standards, various prediction schemes may be used to improve a compression effect. Of these, an intra prediction encoding scheme may be generally used.
An intra prediction mode may generate a prediction image using reference pixels existing at a periphery of a sub-block with respect to a plurality of sub-blocks included in a macro block, and may perform a differentiation with a current block intended to be encoded to generate a difference image. Depending on a location of the reference pixel with respect to each of the plurality of sub-blocks, a specific prediction mode may be determined.
The intra prediction encoding scheme may support an intra 16×16 encoding mode and an intra 4×4 encoding mode according to a size of the sub-block, and the H.264 standard may even support an intra 8×8 encoding mode.
The generated difference image may be transformed using a Discrete Cosine Transformation (DCT), a quantization process, and an entrophy transformation. In the intra prediction encoding scheme, a number of bits in the transformed image may be calculated based on each prediction mode, and a distortion rate with an encoded block may be calculated to thereby calculate a bit-distortion rate with respect to each prediction mode. In this instance, a mode having a minimal bit-distortion rate may be determined as an optimal mode for performing an encoding with respect to the mode determined as the optimal mode.
Basically, the H.264 standard may perform encoding/decoding in a macro block unit of a 16×16 block. The intra 4×4 encoding mode may have to 4×4 sized sub-block. Accordingly, the intra 4×4 encoding mode may divide the macro block into 16 sub-blocks for the purpose of generating the prediction image. In the intra 4×4 encoding mode, 16 prediction mode information with respect to each sub-block may be needed. Similarly, in the intra 8×8 encoding mode, 4 prediction mode information may be needed due to a sub-block size of 8×8.
Accordingly, in the conventional H.264 moving picture compression standard, the intra 4×4 encoding mode information may be reduced using a Most Probable Mode (MPM), thereby improving an encoding efficiency.
However, in the conventional moving picture compression standard, a case where the intra prediction mode and an practical encoding mode are identical to each other in the intra 4×4 encoding mode may be consecutively generated, and thereby unidirectional flag information may be required to be added to reduce a number of bits to be encoded.